﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
<%
    if (Request.IsAuthenticated) {
%>
        Welcome <b><%: Page.User.Identity.Name %></b>!
        [ <%: Html.ActionLink("Log Off", "LogOff", "Account") %> ]
<%
    }
    else {
        string appId = System.Configuration.ConfigurationManager.AppSettings["fbAppId"].ToString();
        string UrlRedirect = System.Configuration.ConfigurationManager.AppSettings["fb_redirect_url"].ToString();
        string loginFbUrl = "http://www.facebook.com/dialog/oauth?client_id=" + appId + "&redirect_uri=" + UrlRedirect +"&scope=email%2Cpublish_stream";
%> 
        - <a href ='<%: loginFbUrl %>'>Login Con Facebook</a> -
        [ <%: Html.ActionLink("Log On", "LogOn", "Account") %> ]
<%
    }
%>
